From e786215b1be4b88e1b43efb2beae15073d6f81db Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 18 Jun 2024 08:32:37 +0700
Subject: <iman> update promotion program (handleSubmitFilter)

---
 src/pages/shop/promo/[slug].tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/pages/shop/promo/[slug].tsx')

diff --git a/src/pages/shop/promo/[slug].tsx b/src/pages/shop/promo/[slug].tsx
index 1248ba35..da720b16 100644
--- a/src/pages/shop/promo/[slug].tsx
+++ b/src/pages/shop/promo/[slug].tsx
@@ -41,7 +41,6 @@ export default function PromoDetail() {
   const [brandValues, setBrandValues] = useState<string[]>([]);
   const [categoryValues, setCategoryValues] = useState<string[]>([]);
   const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
-  const [spellings, setSpellings] = useState(null);
   const popup = useActive();
 
   useEffect(() => {
@@ -243,7 +242,7 @@ export default function PromoDetail() {
   const handleDeleteFilter = async (source, value) => {
     let params = {
       q: router.query.q,
-      orderBy: orderBy,
+      orderBy: '',
       brand: brandValues.join(','),
       category: categoryValues.join(','),
       priceFrom: priceFrom || '',
@@ -270,7 +269,7 @@ export default function PromoDetail() {
       case 'delete':
         params = {
           q: router.query.q,
-          orderBy: orderBy,
+          orderBy: '',
           brand: '',
           category: '',
           priceFrom: '',
@@ -353,6 +352,7 @@ export default function PromoDetail() {
                 brands={brands || []}
                 categories={categories || []}
                 prefixUrl={router.asPath.includes('?') ? `${router.asPath}` : `${router.asPath}?`}
+                // prefixUrl={`${router.query}?`}
                 defaultBrand={null}
               />
         </div>
-- 
cgit v1.2.3

